<html>

<head>
    <meta charset="UTF-8">
    <title>清除浮动</title>
    <style>
    .float {
        height: 200px;
        width: 200px;
        border: 50px red solid;
        float: left;
    }

    .clearfix:before,
    .clearfix:after {
        display: table;
        content: " ";
    }

    .clearfix:after {
        clear: both;
    }
    </style>
</head>



</html>